#ifndef QxTableModel_HPP
#define QxTableModel_HPP

#include <QAbstractTableModel>

#include <QVector>

class QxTableModel : public QAbstractTableModel
{
  Q_OBJECT

public:

  QxTableModel( QObject* parent=0 );
  ~QxTableModel();

  const QVector<float>& buffer() const;
  void setBuffer( const QVector<float>& );

protected:

  virtual int rowCount( const QModelIndex& parent=QModelIndex() ) const;
  virtual int columnCount( const QModelIndex& parent=QModelIndex() ) const;

  virtual QVariant data( const QModelIndex& index, int role=Qt::DisplayRole ) const;
  virtual QVariant headerData( int section, Qt::Orientation orientation, int role=Qt::DisplayRole ) const;

private:

  QVector<float>         m_buffer;
};

#endif // QxTableModel_HPP